package 继承作业;

public  class Fruits {
    private double price;//价格
    private String name;//名字
    private String from;//产地
    public  void madeDish(){
        System.out.println("做水果拼盘");
    }//功能：拼盘

    public Fruits() {
    }

    public Fruits(double price, String name, String from) {
        this.price = price;
        this.name = name;
        this.from = from;
    }

    /**
     * 获取
     * @return price
     */
    public double getPrice() {
        return price;
    }

    /**
     * 设置
     * @param price
     */
    public void setPrice(double price) {
        this.price = price;
    }

    /**
     * 获取
     * @return name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取
     * @return from
     */
    public String getFrom() {
        return from;
    }

    /**
     * 设置
     * @param from
     */
    public void setFrom(String from) {
        this.from = from;
    }

    public String toString() {
        return "Fruits{price = " + price + ", name = " + name + ", from = " + from + "}";
    }
}
